<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%@ include file="/includes/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Admin Console</title>
<meta name="menu" content="notificationIos" />
</head>
<body>
	<h1>发送消息</h1>

	<div style="background:#eee; margin:20px 0px; padding:20px; width:500px; border:solid 1px #999;">
	<div style="margin: 20px 0px;">
	
		<form action="notificationIos.do?action=send" method="post" style="margin: 0px;">
			<table width="600" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td width="20%">To:</td>
					<td width="80%"><input type="radio" name="broadcast" value="Y"
						checked="checked" /> 所有设备 <input type="radio"
						name="broadcast" value="N" /> 单个设备</td>
				</tr>
				<tr id="trUsername" style="display: none;">
					<td>Username:</td>
					<td><input type="text" id="username" name="username" value=""
						style="width: 380px;" /></td>
				</tr>
				<tr>
					<td>Title:</td>
					<td><input type="text" id="title" name="title"
						value="消息推送" style="width: 380px;" /></td>
				</tr>
				<tr>
					<td>Message:</td>
					<td><textarea id="message" name="message"
							style="width: 380px; height: 80px;">疯狂iOS讲义测试推送通知的示例。</textarea></td>
				</tr>
				
				<tr>
					<td>URL:</td>
					<td><input type="text" id="uri" name="uri" value="" style="width:380px;" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><input type="submit" value="发送" /></td>
				</tr>
			</table>
		</form>
	</div>

	<script type="text/javascript">
		$(function() {
			$('input[name=broadcast]').click(function() {
				if ($('input[name=broadcast]')[0].checked) {
					$('#trUsername').hide();
				} else {
					$('#trUsername').show();
				}
			});

			if ($('input[name=broadcast]')[0].checked) {
				$('#trUsername').hide();
			} else {
				$('#trUsername').show();
			}
		});

	</script>

</body>

</html>
